﻿package game.network.api.fb.data{

	public class FacebookSession {

		public var uid:String;
		public var user:Object;
		public var sessionKey:String;
		public var expireDate:Date;
		public var accessToken:String;
		public var secret:String;
		public var sig:String;
		public var availablePermissions:Array;

		public function FacebookSession () {

		}

		public function fromJSON (result:Object):void {
			if (result != null) {
				sessionKey = result.session_key;
				expireDate = new Date(result.expires);
				accessToken = result.access_token;
				secret = result.secret;
				sig = result.sig;
				uid = result.uid;
			}
		}

		public function toString ():String {
			return '[userId:' + uid + ']';
		}
	}
}